package com.vcc.service.client.dto.user;

import com.vcc.core.util.StringUtil;
import com.vcc.data.entity.User;
import com.vcc.service.client.vo.baseVo.BaseVo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

@EqualsAndHashCode(callSuper = true)
@Data
@Setter
@Getter
public class UserParamVo extends BaseVo implements Serializable {

    private String email;

    private String account;

    public UserParamVo(){}

    public UserParamVo(User user){
        super.setId(user.getId());
        this.account = StringUtil.hideMobile(user.getAccount());
        this.email = user.getEmail();
    }
}
